import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'
import Table from './views/nav1/Table.vue'
import Form from './views/nav1/Form.vue'
import user from './views/Manage/user.vue'
import Customer from './views/Manage/Customer.vue'
import Business from './views/Manage/Business.vue'
import Driver from './views/Manage/Driver.vue'
import echarts from './views/charts/echarts.vue'

//引入自己写代码
//1、车辆管理
import Vehicle from './views/Manage/Vehicle.vue'
//2、日志管理
import Log from './views/Manage/Log.vue'
////3、司机管理
//import Driver from './views/Manage/Driver.vue'
// 4、司机入驻页面
import DriverRegister from './views/org/DriverRegister.vue'
//
//
//
//import route from "vue-router"

let routes = [{
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/dRegister',
        component: DriverRegister,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    //{ path: '/main', component: Main },
    {
        path: '/',
        component: Home,
        name: 'Charts',
        leaf: true,
        iconCls: 'fa fa-bar-chart',
        children: [
            { path: '/echarts', component: echarts, name: 'echarts' }
        ]
    },
    // {
    //     path: '/',
    //     component: Home,
    //     name: '汽车租赁系统管理',
    //     iconCls: 'el-icon-message',//图标样式class
    //     children: [
    //         /*component就是上面引入的组件名，且设置对应的路径*/
    //        /* { path: '/vehicle', component: Vehicle, name: '车辆管理' },
    //         { path: '/vehicle', component: Vehicle, name: '车辆管理' },
    //         { path: '/vehicle', component: Vehicle, name: '车辆管理' },*/
    //     ]
    // },
    {
        path: '/vehicle',
        component: Home,
        leaf: true,
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/vehicle', component: Vehicle, name: '车辆管理' },
        ]
    },

    {
        path: '/',
        component: Home,
        //        leaf: true, //只有一个节点
        name: '',
        iconCls: 'fa fa-address-card',
        leaf: true, //只有一个节点
        children: [
            { path: '/Driver', component: Driver, name: '司机管理' }
        ]
    },
    {
        path: '/log',
        component: Home,
        leaf: true,
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/log', component: Log, name: '操作日志' },
        ]
    },

    {
        path: '/',
        component: Home,
        name: '',
        iconCls: 'fa fa-address-card',
        leaf: true, //只有一个节点
        children: [
            { path: '/Customer', component: Customer, name: '客户管理' }
        ]
    },

    {
        path: '/',
        component: Home,
        name: '',
        iconCls: 'fa fa-address-card',
        leaf: true, //只有一个节点
        children: [
            { path: '/Business', component: Business, name: '业务管理' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '',
        iconCls: 'fa fa-address-card',
        leaf: true, //只有一个节点
        children: [
            { path: '/user', component: user, name: '用户管理' }
        ]
    },
    //    {
    //        path: '/',
    //        component: Home,
    //        name: '',
    //        iconCls: 'fa fa-address-card',
    //        leaf: true, //只有一个节点
    //        children: [
    //            { path: '/page6', component: Page6, name: '导航三' }
    //        ]
    //    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;